
CC=gcc
CFLAGS= -g -Wall

src=$(wildcard *.c)
obj=$(patsubst %.c,%.o,$(src))

all:$(obj)
	$(CC) $(CFLAGS) *.o -o example
%.o:%.c
	$(CC) $(CFLAGS) -c $< -o $@  
	
.PHONY:clean
clean:
	rm  *.o

